<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<%
	String path = request.getContextPath();
%>
<title>报表展示</title>
<link rel="stylesheet" type="text/css"
	href="<%=path%>/css/btn_class.css" />
<link rel="stylesheet" type="text/css"
	href="<%=path%>/extjs/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="<%=path%>/extjs/style.css" />
<script type="text/javascript"
	src="<%=path%>/extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="<%=path%>/extjs/ext-all.js"></script>
<script language="JavaScript" src="../../flash/FusionCharts.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

	<style type="text/css">
	
    </style>

<body bgcolor='#FFFFFF'>
	<script type="text/javascript">
	Ext.BLANK_IMAGE_URL = "<%=path%>/extjs/resources/images/default/s.gif";
	
	Ext.onReady(function() {
		var chart;
		var titleStr = top.Ext.getCmp('center-panel').getActiveTab().title; //panel  title
		var strs = new Array(); //定义一数组
		strs = titleStr.split("-"); //字符分割      
		var fbh_chart = strs[1]; //编号
		
		//日工作量统计图
	  	Ext.Ajax.request({
	  		url : 'chartInfo!produceChartDataCommon.do',
			method : 'POST',
			params : {
				"fbh" : 'MCD304'
			},
			success : function(response, action) {
				var data_str = new Array(); //定义一数组
				var responseText = response.responseText;
				
				data_str = responseText.split("##"); //字符分割      
				var chart_data = data_str[1]; //
				var chart_style = data_str[0]; //
				chart_style = chart_style.replace(/\r\n/g,''); 
				//alert(chart_style);
				if(chart_style == "1") {
					chart = new FusionCharts("../../flash/baseCharts/Column3D.swf","chartid","550","300","0","1");
				} else if(chart_style == "2") {
					chart = new FusionCharts("../../flash/baseCharts/AngularGauge.swf","myChartId", "550", "300", "0", "0");
				} else if(chart_style == "3") {
					chart = new FusionCharts("../../flash/baseCharts/Line.swf","chartid","550","300","0","1");
				} else if(chart_style == "4") {
					chart = new FusionCharts("../../flash/baseCharts/MSLine.swf","chartid","550","300","0","1");
				} else if(chart_style == "5") {
					chart = new FusionCharts("../../flash/baseCharts/Doughnut3D.swf","chartid","550","300","0","1");
				} else {
					chart = new FusionCharts("../../flash/baseCharts/Bar2D.swf","chartid","550","300","0","1");
				}
			  	chart.setDataXML(chart_data);
			  	chart.render("chart1");
			},
			// 提交失败的回调函数
			failure : function() {
				Ext.Msg.alert('错误', '服务器出现错误请稍后再试！');
			}
		});
		
	});
	</script>
	<div id="chart1" align=center style="border:1px solid #718da6;"></div>
	
</body>
</html>